<html class="popupwin">
<!--
/***************************************************************
*  Copyright notice
*
*  (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
*  All rights reserved
*
*  This script is part of the TYPO3 project. The TYPO3 project is
*  free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*  A copy is found in the textfile GPL.txt and important notices to the license
*  from the author is found in LICENSE.txt distributed with these scripts.
*
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/*
 * Remove Format Plugin for TYPO3 htmlArea RTE
 *
 * TYPO3 SVN ID: $Id: removeformat.html 3437 2008-03-16 16:22:11Z flyguide $
 */
-->
<head>
	<title>Remove formatting</title>
	<meta http-equiv="Content-Style-Type" content="text/css" />
	<script type="text/javascript">
		/*<![CDATA[*/
		<!--
		var dialog = window.opener.HTMLArea.Dialog.RemoveFormat;

		function Init() {
			dialog.initialize();
			var editor = dialog.plugin.editor;
			if (!editor._selectionEmpty(editor._getSelection())) document.getElementById('clean_selection').checked = true;
		}

		function onOK() {
			var param = {};
			if (document.getElementById('clean_selection').checked) {
				param["cleaning_area"] = "selection";
			} else {
				param["cleaning_area"] = "all";
			}

			var fields = ["formatting", "ms_formatting", "images", "html_all"];
			oneChecked = false;
			for (var i=0; i<fields.length; i++) {
				var id = fields[i];
				var el = document.getElementById(id);
				if (el.checked) {
					param[id] = true;
					oneChecked = true;
				}
			}
			if (oneChecked) {
				dialog.performAction(param);
				dialog.close();
			} else {
				alert(dialog.plugin.localize("Select the type of formatting you wish to remove."));
			}
			return false;
		};

		function onCancel() {
			dialog.close();
			return false;
		}
		// -->
		/*]]>*/
	</script>
</head>
<body class="popupwin" onload="Init();">
<div id="content">
<div class="title">Remove formatting</div>
<form action="" method="get">
	<fieldset>
		<legend><span>Cleaning Area</span></legend>
			<label for="clean_selection"><span>Selection</span></label> <input type="radio" name="cleaning_area" id="clean_selection" value="selection" />
			<label for="clean_page"><span>All</span></label> <input type="radio" name="cleaning_area" id="clean_page" value="page" checked="checked" />
	</fieldset>
	<fieldset>
		<legend><span>Cleaning options</span></legend>
			<div class="space"></div>
			<div class="fl"><label for="formatting">Formatting:</label></div>
			<input type="checkbox" id="formatting" value="" />
			<div class="space"></div>
			<div class="fl"><label for="ms_formatting">MS Word Formatting:</label></div>
			<input type="checkbox" id="ms_formatting" value="" checked="checked" />
			<div class="space"></div>
			<div class="fl"><label for="images">Images:</label></div>
			<input type="checkbox" id="images" value="" />
			<div class="space"></div>
			<div class="fl"><label for="html_all">All HTML:</label></div>
			<input type="checkbox" id="html_all" value="" />
			<div class="space"></div>
	</fieldset>
	<div class="buttons">
		<button type="button" name="ok" onclick="return onOK();">OK</button>
		<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
	</div>
</form>
</div>
</body>
</html>
